//
//  PzPublicData.swift
//  Pz
//
//  Created by 蓝鳍互娱 on 2024/7/4.
//

import Foundation
class PzPublicData: NSObject {
    @objc public static var shareManage = PzPublicData()
    var price:String?
    func requestVipPrice(){
        let parameters = ["packageName":PzPublicConst.ScreenBundld]
        PzNetHttp.defaultRequest().post(PzPublicConst.photoLivePriceUrl, param: parameters) { data in
            let jsonDataDict:NSDictionary = data as! NSDictionary
            let jsonDict:NSDictionary = jsonDataDict["data"] as! NSDictionary

            self.price = jsonDict["price"] as? String
        } fail: { error in
            self.requestVipPrice()
        }
    }
    func requestVipMaiDian(){
        let parameters = ["name":"03:zjz","price":PzPublicData.shareManage.price,"udid":UIDevice.current.identifierForVendor?.uuidString]
        PzNetHttp.defaultRequest().post(PzPublicConst.photoLiveMaidianUrl, param: parameters as [AnyHashable : Any]) { data in
            
        } fail: { error in
            self.requestVipPrice()
        }
    }
}
